import { postAxios, getAxios, postDownloadAxios } from "@/lib/http";

export const roadApi = {
  // 获取详情
  getById: data => {
    return getAxios(`/road/getById/${data}`);
  },
  // 获取详情
  getById: data => {
    return getAxios(`/road/getById/${data}`);
  },
  // 添加路面 @author wuhq
  addRoad: data => {
    return postAxios("/road/add", data);
  },
  // 分页查询路面 @author wuhq
  queryRoad: data => {
    return postAxios("/road/page/query", data);
  },
  // 批量删除路面 @author wuhq
  batchDeleteRoad: idList => {
    return postAxios("/road/deleteByIds", idList);
  },
  // 修改路面  @author wuhq
  updateRoad: data => {
    return postAxios("/road/update", data);
  },
  // 导出全部  @author wuhq
  exportAll: data => {
    return postDownloadAxios("/road/export/all", data);
  },
  // 批量导出  @author wuhq
  batchExport: idList => {
    return postDownloadAxios("/road/export/batch", idList);
  }
};
